<?php
namespace Home\Model;
use Common\Model\BaseModel;

class RoleModel extends BaseModel {

    public $tableName = 'role';

    public function getRoleList(){

        $list = $this->select();
        return !empty($list)? $list : array();
    }
    public function getPurview($role_id=''){

        $info = $this->field('purview_id,name')->where("role_id={$role_id}")->limit(1)->select();

        return !empty($info)? $info[0] : '';
    }
    
}